package cemp.mapper;

import cemp.entity.StockAll;
import cemp.extension.ExtensionMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author xsb_t
* @description 针对表【stock_all】的数据库操作Mapper
* @createDate 2024-11-08 17:55:59
* @Entity cemp.entity.StockAll
*/
public interface StockAllMapper extends ExtensionMapper<StockAll> {

    @Select("select count(*) from stocks_all")
    public int exception();

    @Select("select  t1.* from stock_all t1 left join stock_dfcf_kpi_day t2 on t1.stock_code = t2.stock_code and t2.sta_date = #{staDate}\n" +
            "where t2.stock_code is null limit 50")
    List<StockAll> getUndoStocks4Tecent(@Param("staDate")String staDate);

    @Select("select * from stock_all limit 50 offset #{offset}")
    List<StockAll> getUndoStocks4Tecent2(@Param("offset")Integer offset);
}




